import api from './index'
import { axios, request } from '@/utils/request'
import Qs from 'qs'

//借款分页
export function loanList(current,pageSize,mobile,status ) {
    return axios({
      url: 'api/loanLog/manage/loanLogs',
      method: 'get',
      params:{            
        'current':current,
        'pageSize':pageSize,
        'mobile':mobile,
        'status':status
      }
    })
  }


  //订单列表
  export function orderStatus(){
    return axios({
      url: 'api/orderStatus/manage/order_status',
      method: 'get', 
    })
  }

  //首页信息
  export function indexInfo(){
    return axios({
      url: 'api/index/manage/info',
      method: 'get', 
    })
  }

  //改款
  export function modifyMoeny(id,price) {
    return axios({
      url: '/api/loanLog/manage/money',
      method: 'put',
      params:{            
        'id':id,
        'price':price ,
      }
    })
  }

  //借款
  export function loanLog(info) {
    return axios({
      url: '/api/loanLog/loan_log',
      method: 'post',
      data:info
    })
  }
  //批量删除
export function deteleLoanLogs(ids) {
  return axios({
    url: `/api/loanLog/manage/loanLogs/${ids}`,
    method: 'delete',
    
  })
}


//订单批量删除
export function deleteOrderStatus(ids) {
  return axios({
    url: `/api/orderStatus/manage/order_status/${ids}`,
    method: 'delete',
  })
}
//新增订单状态
export function getList(info) {
  return axios({
    url: '/api/orderStatus/manage/order_status',
    // url: '/api​/orderStatus​/manage​/order_status',
    method: 'post',
    data: info,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
     
    }
  })
}
//借款审核
export function loanLogsFunction(status,ids) {
  return axios({
    url: `/api/loanLog/manage/loanLogs/${status}/${ids}`,
    method: 'put',
  })
}
